import { CityPage } from './../page/city/city.page';
import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { HomePage } from './home.page';
import { ListPage } from '../list/list.page';
const routes: Routes = [
  {
    path: '',
    redirectTo: '/home/list',
    pathMatch: 'full'
  },
  {
    path: '',
    component: HomePage,
    children: [
      {
        path: 'list',
        component: ListPage
      },
      { path: 'city', component: CityPage },
      {
        path: 'news',
        loadChildren: './../page/news/news/news.module#NewsPageModule'
      },
      {
        path: 'all-plan',
        loadChildren:
          './page/all-plan/all-plan/all-plan.module#AllPlanPageModule'
      }
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class HomepRoutingModule {}
